<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="pragma" content="no-cache" />
	<link rel="stylesheet" href="/css/style.css" type="text/css"/>
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/js/util.js"></script>
</head>
<script>
//////////////////////////////////////////////////////////////////////
////  email = "wenpin.qian@happyelements.com"                     ////
////  team = "Athene"                                             ////
////  warnings = "This is generated page,Do Not Modify!";         ////
////  tips = "Opera & IE not supported|Chrome & Safari sugguested"////
//////////////////////////////////////////////////////////////////////
var getListUrl = "/versusBattlePoint/getList/";
var removeUrl = "/versusBattlePoint/remove/";
var searchUrl = "/versusBattlePoint/search/";
$(document).ready(function () {
	showMore(1);
});
function go2Page() {
	var page = xparseInt($("#pageValue").val())
	showMore(page < 1 ? 1 : page);
}
function showMore(pageIndex) {
	startMasker();
	$.ajax({
		   type: "GET",
		   url: getListUrl,
		   data: "pageIndex=" + pageIndex,
		   dataType: "html",
		   success: function(data) {
			   $("#area").html(data);
			   stopMasker();
		   }
	});
}
function promptAdd() {
	var retcallback = function(retvalue) {
		if(retvalue > 0) {
			window.location.reload();
		}
	}
	openDialog("add.html",null,"dialogWidth:600px;dialogHeight:600px;status:no;help:no;center:yes",retcallback);
}
function promptExport() {
	openDialog("export.html",null,"dialogWidth:600px;dialogHeight:600px;status:no;help:no;center:yes");
}
function removeversusBattlePoint(versusBattlePointId) {
	var tips = confirm("你确定要删除么？");
	if(!tips) {
		return;
	}
	$.ajax({
		   type: "GET",
		   url: removeUrl,
		   data: "versusBattlePointId=" + versusBattlePointId,
		   dataType: "json",
		   success: function(data) {
			  	$("#row_" + versusBattlePointId).hide();
		   }
	});
}
function editversusBattlePoint(versusBattlePointId) {
	var returnCallback = function(retvalue) {
		if(retvalue > 0) {
			window.location.reload();
		}
	}
	openDialog("edit.html" ,versusBattlePointId,"dialogWidth:600px;dialogHeight:600px;status:no;help:no;center:yes",returnCallback);
}
function showversusBattlePoint(versusBattlePointId) {
	openDialog("show.html" ,versusBattlePointId,"dialogWidth:600px;dialogHeight:600px;status:no;help:no;center:yes");
}
function searchversusBattlePoint() {
	var condition = $("#searchCondition").val();
	var value = $("#searchValue").val();
	if(value == null || value == "") {
		alert("请输入查询值");
		return;
	}
	startMasker();
	if(value == undefined || value == "") {
		window.location.reload();
		stopMasker();
	}else {
		$.ajax({
			   type: "GET",
			   url: searchUrl,
			   data: "condition=" + condition + "&value=" + value,
			   dataType: "html",
			   success: function(data) {
			   stopMasker();
				   $("#area").html(data);
			   }
		});
	}
}
function promptMenu(id) {
	var position = $("#row_" + id).position();
	$("#rightmenu").css('left',position.left + 40);
	$("#rightmenu").css('top',position.top + 20);
	$("#menuedit").unbind('click');
	$("#menuedit").click(function(e) {
		editversusBattlePoint(id);
	});
	$("#menuremove").unbind('click');
	$("#menuremove").click(function(e) {
		removeversusBattlePoint(id);
	});
	$("#rightmenu").unbind('mouseleave');
	$("#rightmenu").mouseleave(function(e) {
		$("#rightmenu").hide();
	});
	$("#rightmenu").show();
}
</script>
<body>
<div class="area" id="area">

</div>
<div class="rightmenu" id="rightmenu">
<ul>
<li>
<a href="javascript:void(0)" id="menuedit">编辑</a>
</li>
<li>
<a href="javascript:void(0)" id="menuremove">删除</a>
</li>
</div>	
</body>